package com.xbongbong.pro.domain.dao;

import com.xbongbong.pro.domain.entity.AiAssistantEntity;
import com.xbongbong.pro.domain.entity.DataWarningEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @ClassName DataWarningDao
 * @Description 智能助手
 * @Author mengna.Deng
 * @Date 2021/4/15 16:43
 * @Version 1.0
 */
@Repository
@Mapper
public interface DataWarningDao {
    Integer insert(DataWarningEntity dataWarningEntity);

    Integer update(DataWarningEntity dataWarningEntity);

    void insertBatch(List<DataWarningEntity> entityList);

    Integer deleteByKey(@Param("key") Long key, @Param("corpid") String corpid);

    DataWarningEntity getByKey(@Param("key") Long key, @Param("corpid") String corpid);

    List<DataWarningEntity> findEntitys(@Param("param") Map<String, Object> param);

    Integer getEntitysCount(@Param("param") Map<String, Object> param);

    List<String> findCorps(@Param("param") Map<String, Object> param);

    Integer getCorpsCount();

    int getCountByChartId(@Param("chartId") Long chartId, @Param("enable") Integer enable);

    void updateBatch(@Param("list") List<DataWarningEntity> entityList, @Param("corpid") String corpid);

    List<DataWarningEntity>  queryByChartId(@Param("corpid")String corpid,@Param("chartId")Long chartId);

    List<Long> findDwIds(@Param("param") Map<String, Object> param);

    void deleteBatch(@Param("corpid") String corpid,@Param("chartIdIn") List<Long> chartIdIn);

}
